from fastapi import FastAPI

from app.blog_service.api import register_routers
from app.blog_service.middleware.blog_visit_middleware import blog_visit_middleware
from common.middleware.exceptions import global_exception_handler

app = FastAPI(title="Admin Service")

# 加载中间件
app.middleware("http")(global_exception_handler)
app.middleware("http")(blog_visit_middleware)

# 挂载API
# register_routers(app)